package com.ruoyi.manage.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.manage.mapper.ChildrenMapper;
import com.ruoyi.manage.domain.Children;
import com.ruoyi.manage.service.IChildrenService;

/**
 * 儿童信息Service业务层处理
 * 
 * @author Admin
 * @date 2025-09-05
 */
@Service
public class ChildrenServiceImpl implements IChildrenService 
{
    @Autowired
    private ChildrenMapper childrenMapper;

    /**
     * 查询儿童信息
     * 
     * @param id 儿童信息主键
     * @return 儿童信息
     */
    @Override
    public Children selectChildrenById(Long id)
    {
        return childrenMapper.selectChildrenById(id);
    }

    /**
     * 查询儿童信息列表
     * 
     * @param children 儿童信息
     * @return 儿童信息
     */
    @Override
    public List<Children> selectChildrenList(Children children)
    {
        return childrenMapper.selectChildrenList(children);
    }

    /**
     * 新增儿童信息
     * 
     * @param children 儿童信息
     * @return 结果
     */
    @Override
    public int insertChildren(Children children)
    {
        children.setCreateTime(DateUtils.getNowDate());
        return childrenMapper.insertChildren(children);
    }

    /**
     * 修改儿童信息
     * 
     * @param children 儿童信息
     * @return 结果
     */
    @Override
    public int updateChildren(Children children)
    {
        children.setUpdateTime(DateUtils.getNowDate());
        return childrenMapper.updateChildren(children);
    }

    /**
     * 批量删除儿童信息
     * 
     * @param ids 需要删除的儿童信息主键
     * @return 结果
     */
    @Override
    public int deleteChildrenByIds(Long[] ids)
    {
        return childrenMapper.deleteChildrenByIds(ids);
    }

    /**
     * 删除儿童信息信息
     * 
     * @param id 儿童信息主键
     * @return 结果
     */
    @Override
    public int deleteChildrenById(Long id)
    {
        return childrenMapper.deleteChildrenById(id);
    }
}
